<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<head>
    <title>Title</title>
    <%@include file="../../../static/common/common.jsp" %>
    <script src="/static/js/employee.js"></script>
</head>
<!--非常关键-->
<jsp:include page="/static/style/loader.jsp"></jsp:include>
<body>
<table id="employee_datagrid"></table>
<div id="emp_btns">
    <shiro:hasPermission name="employee:saveOrUpdate">
        <a class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" data-cmd="add">新增</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="edit">编辑</a>
        <a class="easyui-linkbutton" data-options="iconCls:'icon-ok',plain:true" data-cmd="detail">详细信息</a>
    </shiro:hasPermission>
    <a id="changeState_btn" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
       data-cmd="changeState">离职</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reload">刷新</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-refresh',plain:true" data-cmd="openPassword">重置密码</a>
    <input class="easyui-textbox" name="keyword" prompt="请输入用户名或真实名称或电话">
    <input class="easyui-combobox"
           data-options="url:'/dept/selectAll.do',valueField:'id',textField:'name',panelHeight:'auto'" name="deptId">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" data-cmd="query"></a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-redo',plain:true" data-cmd="exportXls"></a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-tip',plain:true" data-cmd="import"></a>
</div>
<div id="home_btns">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="addHome">新增</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="delHome">删除</a>
</div>
<div id="work_btns">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="addWork">新增</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="delWork">删除</a>
</div>
<div id="save_btns">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="save">保存</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="cancel">取消</a>
</div>
<div id="password_btns">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="resetPassword">保存</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="cancel2">取消</a>
</div>
<div id="import_btns">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="import_save">保存</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="import_cancel">取消</a>
</div>

<div id="saveDetail_btns">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="saveDetail">保存</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="cancelDetail">取消</a>
</div>

<div id="emp_dialog">
    <form id="emp_form" method="post">
        <input id="empId" type="hidden" name="id">
        <table align="center" style="margin-top: 10px" cellspacing="10">
            <tr>
                <td>用户名:</td>
                <td><input class="easyui-textbox" name="username" prompt="请输入用户名"
                           validType="remote['/employee/validateUsername.do?id='+empId.value,'username']"
                           invalidMessage="用户名已存在"></td>
            </tr>
            <tr>
                <td>真实姓名:</td>
                <td><input class="easyui-textbox" name="realname"></td>
            </tr>
            <tr id="password_tr">
                <td>密码:</td>
                <td><input class="easyui-passwordbox" name="password"></td>
            </tr>
            <tr>
                <td>电话:</td>
                <td><input class="easyui-textbox" name="tel"></td>
            </tr>
            <tr>
                <td>邮箱:</td>
                <td><input class="easyui-textbox" name="email"></td>
            </tr>
            <tr>
                <td>部门:</td>
                <td><input class="easyui-combobox" name="dept.id"
                           data-options="url:'/dept/selectAll.do',valueField:'id',textField:'name',panelHeight:'auto'">
                </td>
            </tr>
            <tr>
                <td>管理员:</td>
                <td><input class="easyui-combobox" name="admin"
                           data-options="data:[
                           {name:'是',value:'1'},{name:'否',value:'0'}],valueField:'value',textField:'name',panelHeight:'auto'">
                </td>
            </tr>
            <tr>
                <td>入职时间:</td>
                <td><input class="easyui-datebox" name="hireDate"></td>
            </tr>
            <tr>
                <td>角色:</td>
                <td><input class="easyui-combobox" id="role_combobox"
                           data-options="multiple:true,url:'/role/selectAll.do',valueField:'id',textField:'name',panelHeight:'auto'">
                </td>
            </tr>
        </table>
    </form>
</div>
<div id="reset_password">
    <form id="password_form">
        <input type="hidden" name="id">
        <table align="center" style="margin-top: 10px" cellspacing="10">
            <tr>
                <td>
                    原始密码:
                </td>
                <td>
                    <input class="easyui-passwordbox" disabled="true" name="password">
                </td>
            </tr>
            <tr>
                <td>
                    新密码:
                </td>
                <td>
                    <input class="easyui-passwordbox" name="newPassword">
                </td>
            </tr>
        </table>
    </form>
</div>
<div id="import_dialog">
    <form id="import_form" method="post" enctype="multipart/form-data">
        <table>
            <tr>
                <a class="easyui-linkbutton" data-options="iconCls:'icon-tip'"></a>
            </tr>
            <tr>
                <input  type="file" value="上传" name="file">
            </tr>
        </table>
    </form>
</div>







<!--华丽丽的分割线线线线线线  员工详细详细详细信息-->
<div id="detailInfo_dialog">
    <form id="detailInfo_form" method="post">
        <input name="detailInformation.id" type="hidden">
        <input name="state" type="hidden">
        <input name="username" type="hidden">
        <input name="admin" type="hidden">
        <div id="tt" class="easyui-tabs" style="width:700px;height:400px;">
            <div title="基本信息">
                <input type="hidden" name="id">
                <table align="center" style="font-size: 10px" width="600px" cellpadding="0px" cellspacing="1px">
                    <tr style="height: 10px"></tr>
                    <tr>
                        <td colspan="6">
                            <span style="font-size: 18px;color: #00aff0"><b>基本信息</b></span>
                        </td>
                    </tr>

                    <tr style="height: 18px">
                        <td><span style="font-size: 10px">姓名:</span></td>
                        <td><input class="easyui-textbox" name="realname" readonly="true"
                                   style="width: 118px;height: 18px;"/></td>
                        <td><span style="font-size: 10px">电话:</span></td>
                        <td><input  class="easyui-textbox" name="tel" readonly="true" style="width: 118px;height: 18px;"/></td>
                        <td><span style="font-size: 10px">邮箱:</span></td>
                        <td><input class="easyui-textbox" name="email" readonly="true"  style="width: 118px;height: 18px;"/></td>
                    </tr>
                    <tr style="height: 18px">
                        <td><span style="font-size: 10px">部门:</span></td>
                        <td><input type="text" class="easyui-combobox"
                                   name="dept.id" readonly="true"
                                   style="width: 118px;height: 18px;"
                                   data-options="url:'/dept/selectAll.do',
                                   valueField:'id',textField:'name',panelHeight:'auto'">
                        </td>
                        <td><span style="font-size: 10px">入职时间:</span></td>
                        <td><input class="easyui-textbox"
                                   name="hireDate" readonly="true"
                                   style="width: 118px;height: 18px;"></td>
                        <td><span style="font-size: 10px">状态:</span></td>
                        <td>
                            <select class="easyui-combobox" style="width: 118px;height: 18px;"
                                    name="state"
                                    data-options="data:[{
                                                    value:'1',
                                                    text:'在职'
                                                },{
                                                    value:'0',
                                                    text:'离职'
                                                }],valueField:'value', textField:'text'
                                                ,panelHeight:'auto'">
                            </select>
                        </td>
                    </tr>
                    <tr style="height: 18px">
                        <td><span style="font-size: 10px">职务:</span></td>
                        <td><input  class="easyui-combobox" id="detail_role_combobox"
                                     readonly="true" style="width: 118px;height: 18px;"
                                    data-options="multiple:true,url:'/role/selectAll.do',
                                   valueField:'id',textField:'name',panelHeight:'auto'"></td>
                        <td><span style="font-size: 10px">性别:</span></td>
                        <td><input class="easyui-combobox" name="detailInformation.gender" style="width: 118px;height: 18px;"
                                   data-options="data:[{
                                                    value:'1',
                                                    text:'男'
                                                },{
                                                    value:'0',
                                                    text:'女'
                                                }],valueField:'value', textField:'text'
                                                ,panelHeight:'auto'">
                        </td>
                        <td><span style="font-size: 10px">招聘形式:</span></td>
                        <td><input name='detailInformation.hireType'
                                   style="width: 118px;height: 18px"  class="easyui-combobox"
                                   data-options="url:'/dictionaryItem/getItemBySn.do?sn=hireType',valueField:'name',
                                   textField:'name',panelHeight:'auto'">
                        </td>
                    </tr>
                    <tr style="height: 18px">
                        <td><span style="font-size: 10px">民族:</span></td>
                        <td><input  class="easyui-combobox"
                                    data-options="url:'/dictionaryItem/getItemBySn.do?sn=nation',valueField:'name',
                                   textField:'name',panelHeight:'auto'"
                                    name="detailInformation.nation" style="width: 118px;height: 18px;"></td>
                        <td><span style="font-size: 10px">身份证</span></td>
                        <td><input class="easyui-textbox" name="detailInformation.identityCardNumber" style="width: 118px;height: 18px;"></td>
                        <td><span style="font-size: 10px">政治面貌:</span></td>
                        <td><input name="detailInformation.politicsStatus" class="easyui-combobox" name="politicsStatus" style="width: 118px;height: 18px;"
                                   data-options="data: [{
                                                    value:'0',
                                                    text:'党员'
                                                },{
                                                    value:'1',
                                                    text:'群众'
                                                }],valueField:'value',textField:'text',panelHeight:'auto'">
                        </td>
                    </tr>
                    <tr style="height: 18px">
                        <td><span style="font-size: 10px">学历:</span></td>
                        <td><input  class="easyui-combobox" name="detailInformation.education"
                                   data-options="url:'/dictionaryItem/getItemBySn.do?sn=education',valueField:'name',
                                   textField:'name',panelHeight:'auto'"
                                   style="width: 118px;height: 18px;"></td>
                        <td><span style="font-size: 10px">出生日期:</span></td>
                        <td><input  name="detailInformation.birthday"  class="easyui-datebox" style="width: 118px;height: 18px;" id="birthday_datebox"></td>
                        <td><span style="font-size: 10px">籍贯:</span></td>
                        <td><input class="easyui-combobox" name="detailInformation.nativePlace"
                                   data-options="url:'/dictionaryItem/getItemBySn.do?sn=nativePlace',valueField:'name',textField:'name',panelHeight:'auto'"
                                   style="width: 118px;height: 18px;"/>
                        </td>
                    </tr>

                    <tr style="height: 18px">
                        <td><span style="font-size: 10px">工龄:</span></td>
                        <td><input class="easyui-textbox" name="detailInformation.workingYears" style="width: 118px;height: 18px;">
                        </td>
                        <td><span style="font-size: 10px">户口类型:</span></td>
                        <td><input type="text" class="easyui-combobox" name="detailInformation.residenceType"
                                   style="width: 118px;height: 18px;"
                                   data-options="url:'/dictionaryItem/getItemBySn.do?sn=residenceType',
                                   valueField:'name',textField:'name',panelHeight:'auto'">
                        </td>

                    </tr>
                    <tr>
                        <td><span style="font-size: 10px">备注:</span>
                        </td>
                        <td colspan="3"><input class="easyui-textbox" name="detailInformation.remark"
                               style="width: 400px;height: 80px;">
                        </input>
                        </td>
                    </tr>
                </table>
            </div>

            <div title="工资信息" data-options="closable:false" width="auto" style="overflow:auto;padding:18px;display:none;">
                <table align="center" width="auto" style="border-collapse:separate; border-spacing:0px 10px;">
                    <tr>
                        <td colspan="3">
                            <span style="font-size: 18px;color: #00aff0"><b>工资信息</b></span>
                        </td>
                    </tr>

                    <tr style="height: 18px">
                        <td><span style="font-size: 10px">银行账号类型:</span></td>
                        <td><input type="text" class="easyui-combobox" name="detailInformation.bankAccountType"
                                   style="width: 118px;height: 18px;"
                                   data-options="url:'/dictionaryItem/getItemBySn.do?sn=bankAccountType',valueField:'name',textField:'name',panelHeight:'auto'">
                        </td>
                    </tr>
                    <tr>
                        <td><span style="font-size: 10px">银行账号:</span></td>
                        <td><input type="text" class="easyui-textbox" name="detailInformation.bankAccount"
                                   style="width: 118px;height: 18px;">
                        </td>
                    </tr>

                    <tr style="height: 18px">
                        <td><span style="font-size: 10px">基本工资:</span></td>
                        <td><input type="text" class="easyui-textbox" name="detailInformation.basePay"
                                   style="width: 118px;height: 18px;">
                        </td>
                    </tr>
                    <tr>
                        <td><span style="font-size: 10px">公积金:</span></td>
                        <td><input type="text" class="easyui-textbox" name="detailInformation.accumulationFund"
                                   style="width: 118px;height: 18px;">
                        </td>
                    </tr>
                    <tr style="height: 18px">
                        <td><span style="font-size: 10px">养老保险:</span></td>
                        <td><input type="text" class="easyui-textbox" name="detailInformation.endowmentInsurance"
                                   style="width: 118px;height: 18px;">
                        </td>
                    </tr>
                    <tr>
                        <td><span style="font-size: 10px">医疗保险:</span></td>
                        <td><input type="text" class="easyui-textbox" name="detailInformation.medicalInsurance"
                                   style="width: 118px;height: 18px;">
                        </td>
                    </tr>

                    <tr style="height: 18px">
                        <td><span style="font-size: 10px">生育保险:</span></td>
                        <td><input type="text" class="easyui-textbox" name="detailInformation.birthInsurance"
                                   style="width: 118px;height: 18px;">
                        </td>
                    </tr>

                </table>
            </div>

            <div title="家庭信息" data-options="closable:false" style="overflow:auto;padding:18px;display:none;">
                <table id="home_datagrid" width="auto" align="center" style="border-collapse:separate; border-spacing:0px 10px;">
                </table>
            </div>

            <div title="工作历史" data-options="closable:false" style="overflow:auto;padding:18px;display:none;">
                <table id="work_datagrid" width="auto" align="center" style="border-collapse:separate; border-spacing:0px 10px;">
                </table>
            </div>
        </div>
    </form>
</div>

</body>
</html>
